
public class Queue<T>
{
	protected Node<T> head;
	protected Node<T> tail;
	protected T element;
	protected int size = 0;
	
	public Queue(T element)
	{
		
	}
	
	public void enqueue(T element)
	{
		Node<T> node = new Node(element);
		if(this.isEmpty())
		{
			
			head = node;
			tail = node;
		}
		else
			tail = node;
	}
	
	public Node<T> dequeue()
	{
		Node<T> temp = head.getnextLeft();
		Node<T> dq = head;
		head = temp;
		return dq;
		
	}
	
	public boolean isEmpty()
	{
		return 0 == size;
	}

}
